/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package xmpp.client.api;

import java.util.ArrayList;
import xmpp.client.api.User.UserXMPP;
import xmpp.client.api.User.UsersXMPP;
import xmpp.client.api.bd.XMPPExceptionSQL;

/**
 *
 * @author Miguel Gonzalez - Juanan Mangudo - Telecor
 */
public class Main {
    public static void main(String[] args) {
            
        UsersXMPP usersXMPP = null;
        ArrayList<UserXMPP> usuariosXMPP = null;
        
        try {
            usersXMPP = new UsersXMPP("root", "telecor", "telecor", "openfire");
            
            usuariosXMPP = usersXMPP.listUsers();
            
            for(UserXMPP userXMPP : usuariosXMPP) {
                System.out.println("Nombre de usuario: " + userXMPP.getUserName());
            }
        } catch (XMPPExceptionSQL ex) {
            System.out.println("Problema al abrir la conexion");
            System.out.println(ex);
        }
        
        
        
        
        
    }
}
